export function submitForm(formId: string, callback: () => void) {
  const form = document.getElementById(formId) as HTMLFormElement;
  if (form) {
    // 触发表单验证
    const isValid = form.checkValidity();
    if (isValid) {
      callback();
    } else {
      // 显示验证错误
      form.reportValidity();
    }
  } else {
    // 如果找不到表单，直接执行回调
    callback();
  }
}